import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import { LoginPage } from '../login/login';



@Component({
  selector: 'page-my',
  templateUrl: 'my.html',
})
export class MyPage {

  cacheCount: number = 0;


  constructor(public navCtrl: NavController, 
    public navParams: NavParams,
    public storage:Storage) {
  }

  ionViewDidLoad() {
    
  }

  /**
   * 退出登录
   */
  logout(){
    this.storage.remove('USER_INFO');
    this.storage.remove('LOGIN_INFO');
    this.navCtrl.setRoot(LoginPage);
  }

}
